package com.gisocn.onemap.ui.adapter;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import butterknife.internal.Utils;
import com.gisocn.onemap.model.Statistic;
import com.gisocn.onemap.sgzx.R;
import java.util.ArrayList;

/* loaded from: classes2.dex */
public class StatisticAdapter extends RecyclerView.Adapter<ViewHolder> {
    private ArrayList<Statistic> list;

    /* loaded from: classes2.dex */
    public class ViewHolder_ViewBinding implements Unbinder {
        private ViewHolder target;

        public ViewHolder_ViewBinding(ViewHolder viewHolder, View view) {
            this.target = viewHolder;
            viewHolder.tvName = (TextView) Utils.findRequiredViewAsType(view, R.id.tv_name, "field 'tvName'", TextView.class);
            viewHolder.tvTotalCount = (TextView) Utils.findRequiredViewAsType(view, R.id.tv_total_count, "field 'tvTotalCount'", TextView.class);
            viewHolder.tvTotalArea = (TextView) Utils.findRequiredViewAsType(view, R.id.tv_total_area, "field 'tvTotalArea'", TextView.class);
            viewHolder.viewLine = Utils.findRequiredView(view, R.id.view_line, "field 'viewLine'");
        }

        @Override // butterknife.Unbinder
        public void unbind() {
            ViewHolder viewHolder = this.target;
            if (viewHolder == null) {
                throw new IllegalStateException("Bindings already cleared.");
            }
            this.target = null;
            viewHolder.tvName = null;
            viewHolder.tvTotalCount = null;
            viewHolder.tvTotalArea = null;
            viewHolder.viewLine = null;
        }
    }

    public StatisticAdapter(ArrayList<Statistic> arrayList) {
        this.list = arrayList;
    }

    @Override // androidx.recyclerview.widget.RecyclerView.Adapter
    public ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
        return new ViewHolder(LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.item_statistic, viewGroup, false));
    }

    @Override // androidx.recyclerview.widget.RecyclerView.Adapter
    public void onBindViewHolder(ViewHolder viewHolder, int i) {
        viewHolder.tvName.setText(this.list.get(i).getName());
        TextView textView = viewHolder.tvTotalCount;
        textView.setText(this.list.get(i).getCount() + "个");
        viewHolder.tvTotalArea.setText(this.list.get(i).getArea());
        viewHolder.viewLine.setVisibility(i == this.list.size() + (-1) ? 8 : 0);
    }

    @Override // androidx.recyclerview.widget.RecyclerView.Adapter
    public int getItemCount() {
        return this.list.size();
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes2.dex */
    public static class ViewHolder extends RecyclerView.ViewHolder {
        @BindView(R.id.tv_name)
        TextView tvName;
        @BindView(R.id.tv_total_area)
        TextView tvTotalArea;
        @BindView(R.id.tv_total_count)
        TextView tvTotalCount;
        @BindView(R.id.view_line)
        View viewLine;

        ViewHolder(View view) {
            super(view);
            ButterKnife.bind(this, view);
        }
    }
}
